package com.modele.dao.impl;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.List;

import com.modele.dao.DAO;
import com.modele.entity.Recapitulatif;


/**
 * @author Haniki
 *
 */
public class RecapitulatifDAO extends DAO<Recapitulatif>{

	/**
	 * @param connexion
	 */
	public RecapitulatifDAO(Connection connexion) {
		super(connexion);
	}

	@Override
	public boolean create(Recapitulatif obj) {
		try {
			PreparedStatement statement = connexion.prepareStatement("INSERT INTO recapitulatif " +
				"(listCommandes) " +
				"VALUES (?)");
			statement.setObject(1, obj.getListCommandes());

			return statement.executeUpdate() == 1;
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return false;
		
	}

	@Override
	public boolean delete(Recapitulatif obj) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean update(Recapitulatif obj) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public Recapitulatif find(int id) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public List<Recapitulatif> findAll() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Recapitulatif findByValue(Object obj) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean isPresent(Object obj) {
		// TODO Auto-generated method stub
		return false;
	}

	}


